export function getUrlByLevel(url:string, level: number) {
  let newUrl = url
  if (url.startsWith('/')) newUrl = newUrl.substring(1)
  if (url.endsWith('/')) newUrl = newUrl.substring(0, newUrl.length - 1)
  const urlArr: string[] = newUrl.split('/')
  if (!urlArr) {
    return null
  }
  return urlArr[level - 1]
}
